/**
 *******************************************************************************
 * @file  gpio/gpio_output/source/main.c
 * @brief Main program of GPIO for the Device Driver Library.
 @verbatim
   Change Logs:
   Date             Author          Notes
   2020-06-12       Zhangxl         First version
 @endverbatim
 *******************************************************************************
 * Copyright (C) 2020, Huada Semiconductor Co., Ltd. All rights reserved.
 *
 * This software component is licensed by HDSC under BSD 3-Clause license
 * (the "License"); You may not use this file except in compliance with the
 * License. You may obtain a copy of the License at:
 *                    opensource.org/licenses/BSD-3-Clause
 *
 *******************************************************************************
 */
/******************************************************************************
 * Include files
 ******************************************************************************/
#include "bsp_init.h"
#include <includes.h>
/******************************************************************************
 * Local pre-processor symbols/macros ('#define')
 ******************************************************************************/

/******************************************************************************
 * Global variable definitions (declared in header file with 'extern')
 ******************************************************************************/
void AppTaskstart(OS_ERR* p_err);

#define APP_TASK_STK_SIZE        128

OS_TCB  AppTaskStartTCB;
static CPU_STK 	AppTaskStartStk[APP_TASK_STK_SIZE];
/******************************************************************************
 * Local type definitions ('typedef')
 ******************************************************************************/

/**
 ******************************************************************************
 ** \brief  Main function of project
 **
 ** \return uint32_t return value, if needed
 **
 ** This sample
 **
 ******************************************************************************/
int main(void)
{    
  OS_ERR Err;
  OSInit(&Err);
    
  OSTaskCreate((OS_TCB    *)&AppTaskStartTCB,      /*Task TCB*/
               (CPU_CHAR  *)"AppTaskStart",        /*task Name*/
               (OS_TASK_PTR)AppTaskstart,          /*Task Entry*/
               (void      *)NULL,      	           /*Task Parameter*/
               (OS_PRIO    )6,	                   /*Task Poirity*/
               (CPU_STK   *)&AppTaskStartStk[0],   /*Stack Start*/
               (CPU_STK    )APP_TASK_STK_SIZE/10,  /*Stack Limit*/
               (CPU_STK    )APP_TASK_STK_SIZE, 	   /*Stack Size*/
               (OS_MSG_QTY )5u,
               (OS_TICK	   )0u,
               (void      *)0u,
               (OS_OPT     )(OS_OPT_TASK_STK_CHK | OS_OPT_TASK_STK_CLR),
               (OS_ERR    *)&Err
             ); 
  OSStart(&Err);
 
  while(1)
  {
    ;
  }
}
